﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.Linq;

public partial class TestLinq : System.Web.UI.Page
{
    //DataContext (db) qui va nous permettre de nous connecter à notre base de données
    public DataContext db;
    //Va permettre d'encapsuler les informations de la table en fonction de notre objet d' "ADHERENT". 
    //C'est dans cet objet que va s'effectuer la requête LINQ
    public Table<Adherent> oAdherents;

    protected void Page_Load(object sender, EventArgs e)
    {

        //Test Insertion Adherent 
        
        AdherentCritere unadherentc = new AdherentCritere();
       /* unadherentc.nom = "ZINEDINE";
        unadherentc.prenom = "Zidane";
        unadherentc.adresse = "17 quai de la joliette";
        unadherentc.cp = "91000";
        unadherentc.ville = "Marseille";
        unadherentc.tel = "0123433222";
        unadherentc.mail = "ahamadasaid@wanadoo.fr";
        unadherentc.dateNaissance = DateTime.Now;
        unadherentc.dateInscription = DateTime.Now;
        unadherentc.lienPhoto = "/images/toto.jpg";
        unadherentc.motdepasse = "toto";
        unadherentc.dateDesinscription = DateTime.Now; */

       // AdherentDAO.ajouterAdherent(unadherentc);

        //Test Authenfication

        unadherentc.login = "sami";
        unadherentc.motdepasse = "toto";
        Adherent unadherent = new Adherent();
        // Test IsFonction
       // unadherent = AdherentDAO.authenficationAdherent(unadherentc);
        //authentification.Text = unadherent.nom;
        //estfonction.Text = AdherentDAO.estfonctionAdherent(unadherent);

     

    } 
}
